<script setup lang="ts">
import { ref } from "vue";
const datajq = ref(JSON.parse(localStorage.getItem("datajq")) || []);
const dataitem = ref(JSON.parse(localStorage.getItem("dataitem")) || []);
console.log(datajq.value);
</script>

<template>
  <van-nav-bar title="锦旗" left-arrow @click-left="$router.back()">
    <template #right>
      <van-icon name="weapp-nav" size="18" />
    </template>
  </van-nav-bar>
  <div class="box">
    <div class="top">
      <span>全部 {{ datajq.length }}</span>
    </div>
    <div class="jq" v-for="item in datajq" :key="item.id">
      <div class="jqbox">
        <div class="name">北京ms388zgj63赠送了医术精湛</div>
        <div class="sj">{{ item.banviewtimer }}</div>
        <div class="img"><img :src="item.banviewimage" alt="" /></div>
      </div>
    </div>
    <div class="footer">
      <van-button
        to="sjq"
        style="width: 95%; margin-left: 2.5%"
        type="primary"
        size="large"
        >我要送锦旗</van-button
      >
    </div>
  </div>
</template>

<style scoped lang="scss">
.box {
  font-size: 0.3rem;
  width: 100%;
  height: 667px;
  overflow: scroll;
  background-color: #f1f1f1;

  .top {
    width: 100%;
    height: 50px;
    background-color: #fff;
    line-height: 50px;
    padding: 0 10px;

    span {
      padding: 8px;
      background-color: #2459cc;
      color: #fff;
      border-radius: 15px;
    }
  }

  .jq {
    width: 95%;
    //height: 200px;
    background-color: #fff;
    margin-left: 2.5%;
    border-radius: 10px;
    margin-top: 10px;
    padding-top: 10px;

    .jq-item {
      width: 100%;
      height: 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 10px;

      .left {
        font-size: 0.3rem;
        color: #9a9a9a;
        display: flex;
        align-items: center;

        .title {
          font-size: 0.5rem;
          font-weight: bold;
          color: #000;
          margin-right: 5px;
        }
      }

      .right {
        font-size: 0.3rem;
        color: #1e6fff;
      }
    }
    .jqbox {
      width: 100%;
      // padding-left: 2.5%;
      //border-bottom: 1px solid #f2f2f2;
      margin-bottom: 10px;

      .name {
        font-size: 0.35rem;
        margin-left: 2.5%;
      }

      .sj {
        font-size: 0.3rem;
        margin-top: 5px;
        color: #9a9a9a;
        margin-left: 2.5%;
      }

      .img {
        width: 100%;
        height: 300px;

        img {
          width: 70%;
          height: 300px;
          margin-left: 15%;
        }
      }
    }

    .jqfooter {
      width: 100%;
      display: flex;
      justify-content: space-around;
      position: absolute;
      left: 0;
      bottom: 10px;
      font-size: 0.3rem;
      color: #3b68ca;
    }
  }

  .footer {
    width: 100%;
    height: 80px;
    background-color: #fff;
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 10px 0;
  }
}
</style>
